import request from '@/util/ProRequest'

// 获取权限列表
export function getProScheduleList(params) {
    return request({
        url: '/proSchedule/page',
        method: 'get',
        params
    })
}
//根据物料编号查询对应的工艺路线
export function getMaterialWorkflowList(code){
    return request({
        url: `/proSchedule/getWorkflows?code=`+code,
        method:'get',
    })
}

export function addProSchedule(data) {
    return request({
        url: '/proSchedule/add',
        method: 'post',
        data
    })
}

export function updateProSchedule(data) {
    return request({
        url: '/proSchedule/update',
        method: 'put',
        data
    })
}

export function queryByCode(code) {
    return request({
        url: '/proSchedule/code/' + code,
        method: 'get'
    })
}

export function deleteProSchedule(id) {
    return request({
        url: '/proSchedule/delete/' + id,
        method: 'delete'
    })
}

export function batchDeleteProSchedule(ids) {
    return request({
        url: '/proSchedule/batchDelete?'+ids,
        method: 'delete',
    })
}
// 获取自动生成的编号
export function getAutoCode() {
    return request({
        url: '/proSchedule/autoCode',
        method: 'get'
    })
}